<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
	<meta name="description" content="">
	<meta name="author" content="">
	<title>长城圣诞庆</title>
	<link rel="stylesheet" type="text/css" href="{$_C.hy_path}css/main.css?t=201512231414">

</head>
<body>
	<!-- 返回首页 -->
	<div class="page back" id="back" onclick="myback();">
		<img src="{$_C.hy_path}images/back.png">
	</div>
	<!-- loading -->
	<div class="page load" id="loading">
		<div class="load_box">
			<div class="load-inner"></div>
			<p>loading...</p>
		</div>
	</div>
	<!-- index -->
	<div class="page index" id="index_page">
		<!-- logo -->
		<div class="logo" id="logo">
			<img src="{$_C.hy_path}images/logo.png" alt="">
		</div>
		<div class="index-sd"></div>
		<div class="index-bottom">
			<img src="{$_C.hy_path}images/index-infobg.png" alt="">
			<div class="index-btn">
				<p>
					<span class="btn red-btn" onclick="show_rule()">活动规则</span>
					<a class="btn red-btn checkBtn {if $canplay.status eq 1}gameStart{else}gameTip{/if}" data-msg="{$canplay.msg}">开始游戏</a>
				</p>
				<p>
					<span class="btn white-btn" onclick="show_gift()">活动奖品</span>
					<span class="btn white-btn" onclick="show_jifen()">积分榜</span>
					<span class="btn white-btn" onclick="myshare()">邀请好友</span>
				</p>
			</div>
		</div>
	</div>
	<!-- 奖品 -->
	<div class="page gift" id="gift">
		<!-- logo -->
		<div class="logo" id="logo">
			<img src="{$_C.hy_path}images/logo.png" alt="">
		</div>
		<img src="{$_C.hy_path}images/gf1.png" alt="">
		<img src="{$_C.hy_path}images/gf2.png" alt="">
		<img src="{$_C.hy_path}images/gf3.png" alt="">
		<img src="{$_C.hy_path}images/gf4.png" alt="">
		<img class="bottom" src="{$_C.hy_path}images/bottom.png" alt="">
	</div>
	<!-- 规则 -->
	<div class="page rule" id="rule">
		<!-- logo -->
		<div class="logo" id="logo">
			<img src="{$_C.hy_path}images/logo.png" alt="">
		</div>
		<img src="{$_C.hy_path}images/rule-title.png" alt="">
		<div class="rule-item">
			<p>活动时间</p>
			<p>2015年12月24号</p>
			<p>——2015年12月28号</p>
		</div>
		<div class="rule-item">
			<p>活动规则</p>
			<p>每个用户只有五次参与活动机会。游戏开始后，30秒内限时滑动圣诞老人加分。圣诞老人接到长城天玺一体机+50分、PC电源+20分、移动3C电源+10分、炸弹-10分；</p>
			<p>用户可将游戏分享给好友，邀请朋友帮忙玩游戏可加分，每位好友仅可加分1次，最多可邀请30位好友；每分享一位好友可以同时增加双方的积分，分享越多积分也越多。</p>
		</div>
		<div class="rule-item">
			<p>活动奖品</p>
			<p>28号23点59分游戏将结束并关闭，根据玩家总积分榜排名靠前依次设置一二三等奖和纪念奖；获奖者名单将在活动结束后7天内公布。</p>
			<p>一等奖：总积分第一名，奖品为长城天   玺一体机一台；</p>
			<p>二等奖：总积分第2-10名，奖品为长城3C安全移动电源一个；</p>
			<p>三等奖：总积分第11-20名，奖品为精美天堂伞一把；</p>
			<p>纪念奖：总积分第21-30名，奖品为长城极致火力鼠标垫一个；</p>
		</div>
		<div class="footer">本次活动最终解释权属于中国长城计算机深圳股份有限公司。</div>
		<img class="bottom" src="{$_C.hy_path}images/bottom.png" alt="">
	</div>
	<!-- 积分 -->
	<div class="page rank" id="rank_page">
		<!-- logo -->
		<div class="logo" id="logo">
			<img src="{$_C.hy_path}images/logo.png" alt="">
		</div>
		<img src="{$_C.hy_path}images/jifen-title.png" alt="">
		{foreach from=$score.data item=se}
		<div class="rank-item">
			<span>{$se.num}</span>
			<span class="touxiang"><img {if $se.headimgurl}src="{$se.headimgurl}"{else}src="{$_C.hy_path}images/boom.png"{/if} alt=""></span>
			<span class="name">{$se.nickname}</span>
			<span class="fenshu">{$se.allScore}分</span>
		</div>
		{/foreach}
		<div class="footer">
			<p>本次活动最终解释权属于中国长城计算机深圳股份有限公司。</p>
			<img class="bottom" src="{$_C.hy_path}images/bottom.png" alt="">
		</div>
	</div>
	<!-- 分享好友 -->
	<div class="page share" id="share" onclick="shback()">
		<img src="{$_C.hy_path}images/share_pic.png">
	</div>
	<script type="text/javascript" src="{$_C.hy_path}js/jquery-1.11.2.min.js"></script>
	<script type="text/javascript">
		window.onload = MyAutoRun;
		var state = true;
		var type = "{$type}";
		function getid(idname){
			return document.getElementById(idname);
		}
		var indexselect = getid("index_page");
		function MyAutoRun( ){
			if(type == 'rank')
			{
				getid("loading").style.display = "none";
				show_jifen();	
			}else {
				getid("loading").style.display = "block";
				setTimeout(function(){
					getid("loading").style.display = "none";
					index_page.style.display = "block";
					if(type == 'start')
					{
						mybegin();
					}
				},800)
			}
		}
		function show_rule(){
			index_page.style.display = "none";
			getid("rule").style.display = "block";
			getid("back").style.display = "block";
			addClass(getid('rule'),'opshow');
			addClass(getid('back'),'opshow');
		}
		function show_gift(){
			index_page.style.display = "none";
			getid("gift").style.display = "block";
			getid("back").style.display = "block";
			addClass(getid('gift'),'opshow');
			addClass(getid('back'),'opshow');
		}
		function show_jifen(){
			index_page.style.display = "none";
			getid("rank_page").style.display = "block";
			getid("back").style.display = "block";
			addClass(getid('rank_page'),'opshow');
			addClass(getid('back'),'opshow');
		}
		function mybegin(){
			window.location.href="index.php?g=mobile&m=index&a=game";
		}
		function myback(){
			index_page.style.display = "block";
			addClass(getid('index_page'),'opshow');
			getid("rule").style.display = "none";
			getid("gift").style.display = "none";
			getid("rank_page").style.display = "none";
			getid("back").style.display = "none";
		}
		function myshare(){
			index_page.style.display = "none";
			getid("share").style.display = "block";
			addClass(getid('share'),'opshow');
		}
		function shback(){
			getid("share").style.display = "none";
			index_page.style.display = "block";
			addClass(getid('index_page'),'opshow');
		}
		
		$(function(){
			$('.index-btn').on('click', '.gameTip', function(e){
				e.preventDefault();
				showToast($(this).attr('data-msg'));
			});
			$('.index-btn').on('click', '.gameStart', function(e){
				e.preventDefault();
				mybegin();
			});
		});
		function addClass(select,show){
			var classname = select.className;
			select.className = classname + ' ' + show;
			setTimeout(function(){
				select.className = classname;
			}, 900)
		}
		

	</script>
	<script>
		var jsdk = {$jsdk};
		var share = {$shareInfo};
		var is_share = {$config.is_share};
		var share_type = {$config.share_type};
	</script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script type="text/javascript" src="{$_C.hy_path}js/wx.js?t=201512231814"></script>
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?468e5a207d746720f562315fbb9dd350";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
	
</body>
</html>
